using DataDynamics.ActiveReports;
using DataDynamics.ActiveReports.Export.Xls;
using SM.core;
using SS;
using System;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Windows.Forms;
namespace TVSBH.func
{
	public class frmStorageCard : Form
	{
		private Func objFunc = new Func();
		private DataTable objTable = new DataTable();
		private Bill objBill = new Bill();
		private string strConnection = "";
		private string currWhID = "";
		public string userName = "";
		public string fullName = "";
		private bool isPostBack = false;
		private IContainer components = null;
		private GroupBox groupBox1;
		private ComboBox cbbProduct;
		private System.Windows.Forms.Label label2;
		private ComboBox cbbParentGID;
		private System.Windows.Forms.Label label1;
		private ComboBox cbbTypeBill;
		private System.Windows.Forms.Label label3;
		private DateTimePicker txtfromDay;
		private DateTimePicker txttoDay;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.Label label5;
		private System.Windows.Forms.Label label6;
		private ComboBox cbbPacket;
		private DataGridView dgvProduct;
		private Button btnSearch;
		private Button btnPrint;
		private Button btnClose;
		private Button btnExportToExcel;
		private System.Windows.Forms.Label label7;
		private ComboBox cbbWareHouse;
		private DataGridViewTextBoxColumn Column7;
		private DataGridViewTextBoxColumn Column2;
		private DataGridViewTextBoxColumn Packet;
		private DataGridViewTextBoxColumn Column8;
		private DataGridViewTextBoxColumn Column1;
		private DataGridViewTextBoxColumn Column4;
		private DataGridViewTextBoxColumn Column5;
		private DataGridViewTextBoxColumn Column6;
		private DataGridViewTextBoxColumn Column3;
		private DataGridViewTextBoxColumn Column9;
		private System.Windows.Forms.Label label8;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn4;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn5;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn6;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn7;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn8;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn9;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn10;
		public frmStorageCard()
		{
			this.InitializeComponent();
		}
		private void frmStorageCard_Load(object sender, EventArgs e)
		{
			this.currWhID = this.objFunc.getWarehouse(this.userName);
			Program.strConnectionString = this.objFunc.strConnectionString;
			this.objFunc.LoadComboBox("SELECT GpID, UPPER(GpName) AS GpName FROM TabGproducts ORDER BY GpName", this.cbbParentGID, "GpID", "GpName");
			this.objFunc.LoadComboBoxStock("SELECT WareHouse_ID, UPPER(WareHouse_Name) AS Name FROM TabWareHouse ORDER BY WareHouse_Name", this.cbbWareHouse, "WareHouse_ID", "Name");
			this.cbbTypeBill.SelectedIndex = 0;
			this.dgvProduct.AutoGenerateColumns = false;
			this.isPostBack = true;
			if (this.cbbParentGID.Items.Count > 0)
			{
				this.cbbPacket.DataSource = null;
				if (this.cbbProduct.Items.Count > 0)
				{
					this.objFunc.LoadComboBoxPacket("SELECT DISTINCT [Packet], productName FROM [TabDetailBill] WHERE [Pid] = " + this.cbbProduct.SelectedValue.ToString(), this.cbbPacket, "Packet", "productName");
				}
			}
		}
		private void cbbProduct_SelectedIndexChanged(object sender, EventArgs e)
		{
			if (this.isPostBack)
			{
				this.cbbPacket.DataSource = null;
				if (this.cbbProduct.Items.Count > 0)
				{
					this.objFunc.LoadComboBoxPacket("SELECT DISTINCT [Packet], productName FROM [TabDetailBill] WHERE [Pid] = " + this.cbbProduct.SelectedValue.ToString(), this.cbbPacket, "Packet", "productName");
				}
			}
		}
		public void getDetailBalancer(string sqlQuery)
		{
			try
			{
				DataTable dataTable = new DataTable();
				DataColumn column = new DataColumn("Pid", typeof(string));
				DataColumn column2 = new DataColumn("BillID", typeof(string));
				DataColumn column3 = new DataColumn("Packet", typeof(string));
				DataColumn column4 = new DataColumn("CreateDate", typeof(string));
				DataColumn column5 = new DataColumn("ProductPrice", typeof(string));
				DataColumn column6 = new DataColumn("Note", typeof(string));
				DataColumn column7 = new DataColumn("ProductNumber", typeof(string));
				DataColumn column8 = new DataColumn("ProductNumberOut", typeof(string));
				DataColumn column9 = new DataColumn("ProductNumberBalancer", typeof(string));
				DataColumn column10 = new DataColumn("ProductUnit", typeof(string));
				dataTable.Columns.Add(column);
				dataTable.Columns.Add(column4);
				dataTable.Columns.Add(column2);
				dataTable.Columns.Add(column3);
				dataTable.Columns.Add(column5);
				dataTable.Columns.Add(column6);
				dataTable.Columns.Add(column7);
				dataTable.Columns.Add(column8);
				dataTable.Columns.Add(column9);
				dataTable.Columns.Add(column10);
				SqlConnection sqlConnection = new SqlConnection(Program.strConnectionString);
				sqlConnection.Open();
				SqlParameter sqlParameter = new SqlParameter("objDate1", SqlDbType.DateTime);
				SqlParameter sqlParameter2 = new SqlParameter("objDate2", SqlDbType.DateTime);
				sqlParameter.Value = DateTime.Parse(this.txtfromDay.Value.ToString().Substring(0, 10) + " 00:00:00 AM");
				sqlParameter2.Value = DateTime.Parse(this.txttoDay.Value.ToString().Substring(0, 10) + " 11:59:59 PM");
				SqlCommand sqlCommand = sqlConnection.CreateCommand();
				sqlCommand.Parameters.Add(sqlParameter);
				sqlCommand.Parameters.Add(sqlParameter2);
				string text = this.cbbWareHouse.SelectedValue.ToString();
				if (text != "0")
				{
					text = " WHERE WID = '" + text + "'";
				}
				else
				{
					text = " WHERE 1 = 1 ";
				}
				if (this.cbbPacket.Items.Count > 1)
				{
					string text2;
					if (this.cbbPacket.SelectedValue.ToString() != "-:- TẤT CẢ CÁC LÔ -:-")
					{
						text2 = " AND [TabDetailBill].[Packet] = '" + this.cbbPacket.SelectedValue.ToString() + "'";
					}
					else
					{
						text2 = "";
					}
					if (sqlQuery == "")
					{
						sqlCommand.CommandText = string.Concat(new string[]
						{
							"SELECT * FROM [TabDetailBill],[TabBill] ",
							text,
							" AND [TabDetailBill].[billID] = [TabBill].[ID] AND [TabDetailBill].[PID] = ",
							this.cbbProduct.SelectedValue.ToString(),
							text2,
							" AND [TabBill].[CreateDate] BETWEEN @objDate1 AND @objDate2 ORDER BY [TabBill].[CreateDate] ASC"
						});
					}
					else
					{
						sqlCommand.CommandText = sqlQuery;
					}
					SqlDataReader sqlDataReader = sqlCommand.ExecuteReader();
					while (sqlDataReader.Read())
					{
						float num = this.numAllIn(sqlDataReader["Pid"].ToString(), sqlDataReader["Packet"].ToString(), DateTime.Parse(sqlDataReader["CreateDate"].ToString())) - this.numAllOut(sqlDataReader["Pid"].ToString(), sqlDataReader["Packet"].ToString(), DateTime.Parse(sqlDataReader["CreateDate"].ToString()));
						string text3;
						if (this.checkInObjTable(sqlDataReader["CreateDate"].ToString(), dataTable))
						{
							text3 = "";
						}
						else
						{
							text3 = sqlDataReader["CreateDate"].ToString().Substring(0, 10);
						}
						if (this.cbbTypeBill.SelectedIndex == 0)
						{
							if (sqlDataReader["TypeInput"].ToString() == "IN1" || sqlDataReader["TypeInput"].ToString() == "IN2" || sqlDataReader["TypeInput"].ToString() == "IN3")
							{
								string text4 = "  Nhập hàng";
								dataTable.Rows.Add(new object[]
								{
									sqlDataReader["Pid"].ToString(),
									text3,
									sqlDataReader["billID"].ToString(),
									sqlDataReader["Packet"].ToString(),
									string.Format(Program.lenAffterDecimal, float.Parse(sqlDataReader["ProductPrice"].ToString())),
									text4,
									sqlDataReader["ProductNumber"].ToString(),
									"0",
									sqlDataReader["ProductNumber"].ToString(),
									" " + sqlDataReader["ProductUnit"].ToString()
								});
							}
							else
							{
								if (sqlDataReader["TypeInput"].ToString() == "OUT1" || sqlDataReader["TypeInput"].ToString() == "OUT2")
								{
									string text4 = "  Xuất hàng | Xuất kho";
									dataTable.Rows.Add(new object[]
									{
										sqlDataReader["Pid"].ToString(),
										text3,
										sqlDataReader["billID"].ToString(),
										sqlDataReader["Packet"].ToString(),
										string.Format(Program.lenAffterDecimal, float.Parse(sqlDataReader["ProductPrice1"].ToString())),
										text4,
										"0",
										sqlDataReader["ProductNumber"].ToString(),
										(num - float.Parse(sqlDataReader["ProductNumber"].ToString())).ToString(),
										" " + sqlDataReader["ProductUnit"].ToString()
									});
								}
								else
								{
									if (sqlDataReader["TypeInput"].ToString() == "OUT3" || sqlDataReader["TypeInput"].ToString() == "OUT4")
									{
										string text4 = "  Xuất hàng bán lẻ";
										dataTable.Rows.Add(new object[]
										{
											sqlDataReader["Pid"].ToString(),
											text3,
											sqlDataReader["billID"].ToString(),
											sqlDataReader["Packet"].ToString(),
											string.Format(Program.lenAffterDecimal, float.Parse(sqlDataReader["ProductPrice2"].ToString())),
											text4,
											"0",
											sqlDataReader["ProductNumber"].ToString(),
											(num - float.Parse(sqlDataReader["ProductNumber"].ToString())).ToString(),
											" " + sqlDataReader["ProductUnit"].ToString()
										});
									}
								}
							}
						}
						else
						{
							if (this.cbbTypeBill.SelectedIndex == 1)
							{
								if (sqlDataReader["TypeInput"].ToString() == "IN1" || sqlDataReader["TypeInput"].ToString() == "IN2" || sqlDataReader["TypeInput"].ToString() == "IN3")
								{
									string text4 = "  Nhập hàng";
									dataTable.Rows.Add(new object[]
									{
										sqlDataReader["Pid"].ToString(),
										text3,
										sqlDataReader["billID"].ToString(),
										sqlDataReader["Packet"].ToString(),
										string.Format(Program.lenAffterDecimal, float.Parse(sqlDataReader["ProductPrice"].ToString())),
										text4,
										sqlDataReader["ProductNumber"].ToString(),
										"0",
										sqlDataReader["ProductNumber"].ToString(),
										" " + sqlDataReader["ProductUnit"].ToString()
									});
								}
							}
							else
							{
								if (sqlDataReader["TypeInput"].ToString() == "OUT1" || sqlDataReader["TypeInput"].ToString() == "OUT2")
								{
									string text4 = "  Xuất hàng | Xuất kho";
									dataTable.Rows.Add(new object[]
									{
										sqlDataReader["Pid"].ToString(),
										text3,
										sqlDataReader["billID"].ToString(),
										sqlDataReader["Packet"].ToString(),
										string.Format(Program.lenAffterDecimal, float.Parse(sqlDataReader["ProductPrice1"].ToString())),
										text4,
										"0",
										sqlDataReader["ProductNumber"].ToString(),
										(num - float.Parse(sqlDataReader["ProductNumber"].ToString())).ToString(),
										" " + sqlDataReader["ProductUnit"].ToString()
									});
								}
								else
								{
									if (sqlDataReader["TypeInput"].ToString() == "OUT3" || sqlDataReader["TypeInput"].ToString() == "OUT4")
									{
										string text4 = "  Xuất hàng bán lẻ";
										dataTable.Rows.Add(new object[]
										{
											sqlDataReader["Pid"].ToString(),
											text3,
											sqlDataReader["billID"].ToString(),
											sqlDataReader["Packet"].ToString(),
											string.Format(Program.lenAffterDecimal, float.Parse(sqlDataReader["ProductPrice2"].ToString())),
											text4,
											"0",
											sqlDataReader["ProductNumber"].ToString(),
											(num - float.Parse(sqlDataReader["ProductNumber"].ToString())).ToString(),
											" " + sqlDataReader["ProductUnit"].ToString()
										});
									}
								}
							}
						}
					}
					sqlDataReader.Close();
					sqlConnection.Close();
					sqlConnection.Dispose();
					this.btnPrint.Enabled = true;
					this.objTable = dataTable;
					this.dgvProduct.DataSource = this.objTable;
					if (this.objTable.Rows.Count > 0)
					{
						this.btnPrint.Enabled = true;
						this.btnExportToExcel.Enabled = true;
					}
					else
					{
						this.btnPrint.Enabled = false;
						this.btnExportToExcel.Enabled = false;
					}
				}
			}
			catch
			{
				this.btnPrint.Enabled = false;
				this.btnExportToExcel.Enabled = false;
				this.objTable = null;
				this.dgvProduct.DataSource = this.objTable;
			}
		}
		private bool checkInObjTable(string tmpDate, DataTable tmpTbale)
		{
			bool flag = false;
			bool result;
			for (int i = 0; i < tmpTbale.Rows.Count; i++)
			{
				if (tmpTbale.Rows[i]["CreateDate"].ToString() == tmpDate.Substring(0, 10))
				{
					flag = true;
					result = flag;
					return result;
				}
			}
			result = flag;
			return result;
		}
		private float numAllIn(string PID, string Packet, DateTime pointDate)
		{
			string text = this.cbbWareHouse.SelectedValue.ToString();
			string text2 = "";
			if (text != "0")
			{
				text = " WHERE WID = '" + text + "'";
			}
			else
			{
				text = " WHERE 1 = 1 ";
			}
			float num = 0f;
			if (Packet != "-:- TẤT CẢ CÁC LÔ -:-")
			{
				text2 = " AND [TabDetailBill].[Packet] = '" + Packet + "'";
			}
			SqlConnection sqlConnection = new SqlConnection(Program.strConnectionString);
			sqlConnection.Open();
			SqlParameter sqlParameter = new SqlParameter("objDate", SqlDbType.DateTime);
			sqlParameter.Value = pointDate;
			SqlCommand sqlCommand = sqlConnection.CreateCommand();
			sqlCommand.Parameters.Add(sqlParameter);
			sqlCommand.CommandText = string.Concat(new string[]
			{
				"SELECT [productNumber],[TypeInput] FROM [TabDetailBill],[TabBill] ",
				text,
				" AND [TabDetailBill].[billID] = [TabBill].[ID] AND [TabDetailBill].[PID] = ",
				PID,
				text2,
				" AND [TabBill].[CreateDate] <= @objDate AND [TypeInput] IN ('IN1','IN2','IN3')"
			});
			SqlDataReader sqlDataReader = sqlCommand.ExecuteReader();
			while (sqlDataReader.Read())
			{
				num += float.Parse(sqlDataReader["productNumber"].ToString());
			}
			sqlDataReader.Close();
			sqlConnection.Close();
			sqlConnection.Dispose();
			return num;
		}
		private float numAllOut(string PID, string Packet, DateTime pointDate)
		{
			string text = this.cbbWareHouse.SelectedValue.ToString();
			if (text != "0")
			{
				text = " WHERE WID = '" + text + "'";
			}
			else
			{
				text = " WHERE 1 = 1 ";
			}
			float num = 0f;
			SqlConnection sqlConnection = new SqlConnection(Program.strConnectionString);
			sqlConnection.Open();
			SqlParameter sqlParameter = new SqlParameter("objDate", SqlDbType.DateTime);
			sqlParameter.Value = pointDate;
			SqlCommand sqlCommand = sqlConnection.CreateCommand();
			sqlCommand.Parameters.Add(sqlParameter);
			sqlCommand.CommandText = string.Concat(new string[]
			{
				"SELECT [productNumber],[TypeInput] FROM [TabDetailBill],[TabBill] ",
				text,
				" AND [TabDetailBill].[billID] = [TabBill].[ID] AND [TabDetailBill].[PID] = ",
				PID,
				" AND [TabDetailBill].[Packet] = '",
				Packet,
				"' AND [TabBill].[CreateDate] <= @objDate AND [TypeInput] IN ('OUT1','OUT2','OUT3','OUT4')"
			});
			SqlDataReader sqlDataReader = sqlCommand.ExecuteReader();
			while (sqlDataReader.Read())
			{
				num += float.Parse(sqlDataReader["productNumber"].ToString());
			}
			sqlDataReader.Close();
			sqlConnection.Close();
			sqlConnection.Dispose();
			return num;
		}
		private void btnSearch_Click(object sender, EventArgs e)
		{
			if (this.isPostBack)
			{
				this.getDetailBalancer("");
			}
		}
		private void cbbTypeBill_SelectedIndexChanged(object sender, EventArgs e)
		{
			try
			{
				this.btnSearch.PerformClick();
				if (this.cbbTypeBill.SelectedIndex == 0)
				{
					this.dgvProduct.Columns["Column4"].Visible = true;
					this.dgvProduct.Columns["Column5"].Visible = true;
				}
				else
				{
					if (this.cbbTypeBill.SelectedIndex == 1)
					{
						this.dgvProduct.Columns["Column4"].Visible = true;
						this.dgvProduct.Columns["Column5"].Visible = false;
					}
					else
					{
						this.dgvProduct.Columns["Column4"].Visible = false;
						this.dgvProduct.Columns["Column5"].Visible = true;
					}
				}
			}
			catch
			{
			}
		}
		private void btnPrint_Click(object sender, EventArgs e)
		{
			frmRepStorageCard.objTable = new DataTable();
			frmStorageCardView frmStorageCardView = new frmStorageCardView();
			frmStorageCardView.dateTime = "Từ " + this.txtfromDay.Text + " đến " + this.txttoDay.Text;
			frmStorageCardView.productName = "Tên hàng hoá : " + this.cbbProduct.Text;
			frmStorageCardView.packetName = "Số lô : " + this.cbbPacket.Text;
			frmRepStorageCard.objTable = this.objTable;
			frmStorageCardView.ShowDialog();
		}
		private void btnClose_Click(object sender, EventArgs e)
		{
			base.Close();
		}
		private void txtfromDay_ValueChanged(object sender, EventArgs e)
		{
			this.btnSearch.PerformClick();
		}
		private void txttoDay_ValueChanged(object sender, EventArgs e)
		{
			this.btnSearch.PerformClick();
		}
		private void btnExportToExcel_Click(object sender, EventArgs e)
		{
			try
			{
				frmRepStorageCard.objTable = new DataTable();
				frmRepStorageCard.objTable = this.objTable;
				ActiveReport3 activeReport = new frmRepStorageCard();
				activeReport.Run();
				XlsExport xlsExport = new XlsExport();
				SaveFileDialog saveFileDialog = new SaveFileDialog();
				saveFileDialog.ShowDialog();
				string text = saveFileDialog.FileName;
				if (text != "")
				{
					if (!text.ToUpper().Contains(".XLS"))
					{
						text += ".xls";
					}
					xlsExport.Export(activeReport.Document, text);
					MessageBox.Show("Hệ thống đã hoàn thành việc xuất dữ liệu ra file Excel", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				}
				else
				{
					MessageBox.Show("Bạn chưa chọn đường dẫn và tên file cần xuất!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
				}
			}
			catch
			{
			}
		}
		private void cbbParentGID_SelectedValueChanged(object sender, EventArgs e)
		{
			this.dgvProduct.DataSource = null;
			this.objFunc.LoadComboBox("SELECT PID, UPPER(P_Name) AS P_Name FROM [TabProducts] WHERE [GpID] = " + this.cbbParentGID.SelectedValue.ToString() + " ORDER BY P_Name", this.cbbProduct, "PID", "P_Name");
		}
		private void cbbPacket_SelectedValueChanged(object sender, EventArgs e)
		{
			this.btnSearch.PerformClick();
		}
		protected override void Dispose(bool disposing)
		{
			if (disposing && this.components != null)
			{
				this.components.Dispose();
			}
			base.Dispose(disposing);
		}
		private void InitializeComponent()
		{
			DataGridViewCellStyle dataGridViewCellStyle = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle2 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle3 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle4 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle5 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle6 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle7 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle8 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle9 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle10 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle11 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle12 = new DataGridViewCellStyle();
			ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(frmStorageCard));
			this.groupBox1 = new GroupBox();
			this.label7 = new System.Windows.Forms.Label();
			this.cbbWareHouse = new ComboBox();
			this.label6 = new System.Windows.Forms.Label();
			this.cbbPacket = new ComboBox();
			this.label5 = new System.Windows.Forms.Label();
			this.label4 = new System.Windows.Forms.Label();
			this.txttoDay = new DateTimePicker();
			this.label3 = new System.Windows.Forms.Label();
			this.txtfromDay = new DateTimePicker();
			this.cbbTypeBill = new ComboBox();
			this.cbbProduct = new ComboBox();
			this.label2 = new System.Windows.Forms.Label();
			this.cbbParentGID = new ComboBox();
			this.label1 = new System.Windows.Forms.Label();
			this.dgvProduct = new DataGridView();
			this.btnSearch = new Button();
			this.btnPrint = new Button();
			this.btnClose = new Button();
			this.btnExportToExcel = new Button();
			this.label8 = new System.Windows.Forms.Label();
			this.dataGridViewTextBoxColumn1 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn2 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn3 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn4 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn5 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn6 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn7 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn8 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn9 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn10 = new DataGridViewTextBoxColumn();
			this.Column7 = new DataGridViewTextBoxColumn();
			this.Column2 = new DataGridViewTextBoxColumn();
			this.Packet = new DataGridViewTextBoxColumn();
			this.Column8 = new DataGridViewTextBoxColumn();
			this.Column1 = new DataGridViewTextBoxColumn();
			this.Column4 = new DataGridViewTextBoxColumn();
			this.Column5 = new DataGridViewTextBoxColumn();
			this.Column6 = new DataGridViewTextBoxColumn();
			this.Column3 = new DataGridViewTextBoxColumn();
			this.Column9 = new DataGridViewTextBoxColumn();
			this.groupBox1.SuspendLayout();
			((ISupportInitialize)this.dgvProduct).BeginInit();
			base.SuspendLayout();
			this.groupBox1.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.groupBox1.Controls.Add(this.label7);
			this.groupBox1.Controls.Add(this.cbbWareHouse);
			this.groupBox1.Controls.Add(this.label6);
			this.groupBox1.Controls.Add(this.cbbPacket);
			this.groupBox1.Controls.Add(this.label5);
			this.groupBox1.Controls.Add(this.label4);
			this.groupBox1.Controls.Add(this.txttoDay);
			this.groupBox1.Controls.Add(this.label3);
			this.groupBox1.Controls.Add(this.txtfromDay);
			this.groupBox1.Controls.Add(this.cbbTypeBill);
			this.groupBox1.Controls.Add(this.cbbProduct);
			this.groupBox1.Controls.Add(this.label2);
			this.groupBox1.Controls.Add(this.cbbParentGID);
			this.groupBox1.Controls.Add(this.label1);
			this.groupBox1.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.groupBox1.Location = new System.Drawing.Point(7, 2);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new Size(887, 91);
			this.groupBox1.TabIndex = 0;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "Thông tin thẻ kho";
			this.label7.AutoSize = true;
			this.label7.BackColor = SystemColors.ButtonFace;
			this.label7.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label7.Location = new System.Drawing.Point(8, 57);
			this.label7.Name = "label7";
			this.label7.Size = new Size(66, 15);
			this.label7.TabIndex = 94;
			this.label7.Text = "Kho hàng :";
			this.label7.TextAlign = ContentAlignment.MiddleRight;
			this.cbbWareHouse.Cursor = Cursors.Hand;
			this.cbbWareHouse.DropDownStyle = ComboBoxStyle.DropDownList;
			this.cbbWareHouse.FlatStyle = FlatStyle.Flat;
			this.cbbWareHouse.Font = new Font("Arial", 8.5f, FontStyle.Bold);
			this.cbbWareHouse.FormattingEnabled = true;
			this.cbbWareHouse.Location = new System.Drawing.Point(78, 54);
			this.cbbWareHouse.Name = "cbbWareHouse";
			this.cbbWareHouse.Size = new Size(190, 22);
			this.cbbWareHouse.TabIndex = 93;
			this.label6.AutoSize = true;
			this.label6.BackColor = SystemColors.ButtonFace;
			this.label6.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label6.Location = new System.Drawing.Point(652, 57);
			this.label6.Name = "label6";
			this.label6.Size = new Size(58, 15);
			this.label6.TabIndex = 58;
			this.label6.Text = "Lô hàng :";
			this.label6.TextAlign = ContentAlignment.MiddleRight;
			this.cbbPacket.BackColor = Color.White;
			this.cbbPacket.DropDownStyle = ComboBoxStyle.DropDownList;
			this.cbbPacket.FlatStyle = FlatStyle.Flat;
			this.cbbPacket.Font = new Font("Arial", 8.5f);
			this.cbbPacket.FormattingEnabled = true;
			this.cbbPacket.Location = new System.Drawing.Point(715, 54);
			this.cbbPacket.Name = "cbbPacket";
			this.cbbPacket.Size = new Size(162, 22);
			this.cbbPacket.TabIndex = 57;
			this.cbbPacket.SelectedValueChanged += new EventHandler(this.cbbPacket_SelectedValueChanged);
			this.label5.AutoSize = true;
			this.label5.BackColor = SystemColors.ButtonFace;
			this.label5.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label5.Location = new System.Drawing.Point(644, 29);
			this.label5.Name = "label5";
			this.label5.Size = new Size(66, 15);
			this.label5.TabIndex = 56;
			this.label5.Text = "Quy cách :";
			this.label5.TextAlign = ContentAlignment.MiddleRight;
			this.label4.AutoSize = true;
			this.label4.Font = new Font("Arial", 9f);
			this.label4.Location = new System.Drawing.Point(161, 30);
			this.label4.Name = "label4";
			this.label4.Size = new Size(18, 15);
			this.label4.TabIndex = 55;
			this.label4.Text = "-:-";
			this.txttoDay.CustomFormat = "dd/MM/yyyy";
			this.txttoDay.Font = new Font("Arial", 9f);
			this.txttoDay.Format = DateTimePickerFormat.Custom;
			this.txttoDay.Location = new System.Drawing.Point(182, 27);
			this.txttoDay.Name = "txttoDay";
			this.txttoDay.Size = new Size(86, 21);
			this.txttoDay.TabIndex = 54;
			this.txttoDay.ValueChanged += new EventHandler(this.txttoDay_ValueChanged);
			this.label3.AutoSize = true;
			this.label3.BackColor = SystemColors.ButtonFace;
			this.label3.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label3.Location = new System.Drawing.Point(15, 29);
			this.label3.Name = "label3";
			this.label3.Size = new Size(59, 15);
			this.label3.TabIndex = 53;
			this.label3.Text = "Từ ngày :";
			this.label3.TextAlign = ContentAlignment.MiddleRight;
			this.txtfromDay.CustomFormat = "dd/MM/yyyy";
			this.txtfromDay.Font = new Font("Arial", 9f);
			this.txtfromDay.Format = DateTimePickerFormat.Custom;
			this.txtfromDay.Location = new System.Drawing.Point(78, 27);
			this.txtfromDay.Name = "txtfromDay";
			this.txtfromDay.Size = new Size(80, 21);
			this.txtfromDay.TabIndex = 52;
			this.txtfromDay.ValueChanged += new EventHandler(this.txtfromDay_ValueChanged);
			this.cbbTypeBill.BackColor = Color.White;
			this.cbbTypeBill.DropDownStyle = ComboBoxStyle.DropDownList;
			this.cbbTypeBill.FlatStyle = FlatStyle.Flat;
			this.cbbTypeBill.Font = new Font("Arial", 8.5f);
			this.cbbTypeBill.FormattingEnabled = true;
			this.cbbTypeBill.Items.AddRange(new object[]
			{
				"NHẬP - XUẤT HÀNG",
				"NHẬP HÀNG",
				"XUẤT HÀNG"
			});
			this.cbbTypeBill.Location = new System.Drawing.Point(715, 26);
			this.cbbTypeBill.Name = "cbbTypeBill";
			this.cbbTypeBill.Size = new Size(162, 22);
			this.cbbTypeBill.TabIndex = 51;
			this.cbbTypeBill.SelectedIndexChanged += new EventHandler(this.cbbTypeBill_SelectedIndexChanged);
			this.cbbProduct.BackColor = Color.White;
			this.cbbProduct.DropDownStyle = ComboBoxStyle.DropDownList;
			this.cbbProduct.FlatStyle = FlatStyle.Flat;
			this.cbbProduct.Font = new Font("Arial", 8.5f);
			this.cbbProduct.FormattingEnabled = true;
			this.cbbProduct.Location = new System.Drawing.Point(350, 54);
			this.cbbProduct.Name = "cbbProduct";
			this.cbbProduct.Size = new Size(289, 22);
			this.cbbProduct.TabIndex = 48;
			this.cbbProduct.SelectedIndexChanged += new EventHandler(this.cbbProduct_SelectedIndexChanged);
			this.cbbProduct.SelectedValueChanged += new EventHandler(this.cbbProduct_SelectedIndexChanged);
			this.label2.AutoSize = true;
			this.label2.BackColor = SystemColors.ButtonFace;
			this.label2.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label2.Location = new System.Drawing.Point(276, 57);
			this.label2.Name = "label2";
			this.label2.Size = new Size(69, 15);
			this.label2.TabIndex = 49;
			this.label2.Text = "Tên thuốc :";
			this.label2.TextAlign = ContentAlignment.MiddleRight;
			this.cbbParentGID.BackColor = Color.White;
			this.cbbParentGID.DropDownStyle = ComboBoxStyle.DropDownList;
			this.cbbParentGID.FlatStyle = FlatStyle.Flat;
			this.cbbParentGID.Font = new Font("Arial", 8.5f);
			this.cbbParentGID.FormattingEnabled = true;
			this.cbbParentGID.Location = new System.Drawing.Point(350, 26);
			this.cbbParentGID.Name = "cbbParentGID";
			this.cbbParentGID.Size = new Size(289, 22);
			this.cbbParentGID.TabIndex = 45;
			this.cbbParentGID.SelectedValueChanged += new EventHandler(this.cbbParentGID_SelectedValueChanged);
			this.label1.AutoSize = true;
			this.label1.BackColor = SystemColors.ButtonFace;
			this.label1.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label1.Location = new System.Drawing.Point(273, 29);
			this.label1.Name = "label1";
			this.label1.Size = new Size(72, 15);
			this.label1.TabIndex = 47;
			this.label1.Text = "Loại thuốc :";
			this.label1.TextAlign = ContentAlignment.MiddleRight;
			this.dgvProduct.AllowUserToAddRows = false;
			this.dgvProduct.AllowUserToDeleteRows = false;
			this.dgvProduct.AllowUserToOrderColumns = true;
			this.dgvProduct.AllowUserToResizeColumns = false;
			this.dgvProduct.AllowUserToResizeRows = false;
			dataGridViewCellStyle.BackColor = Color.FromArgb(192, 255, 255);
			dataGridViewCellStyle.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle;
			this.dgvProduct.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
			this.dgvProduct.BackgroundColor = Color.White;
			this.dgvProduct.BorderStyle = BorderStyle.Fixed3D;
			this.dgvProduct.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
			this.dgvProduct.Columns.AddRange(new DataGridViewColumn[]
			{
				this.Column7,
				this.Column2,
				this.Packet,
				this.Column8,
				this.Column1,
				this.Column4,
				this.Column5,
				this.Column6,
				this.Column3,
				this.Column9
			});
			this.dgvProduct.Cursor = Cursors.Hand;
			this.dgvProduct.EnableHeadersVisualStyles = false;
			this.dgvProduct.Location = new System.Drawing.Point(7, 95);
			this.dgvProduct.MultiSelect = false;
			this.dgvProduct.Name = "dgvProduct";
			this.dgvProduct.ReadOnly = true;
			this.dgvProduct.RowHeadersVisible = false;
			this.dgvProduct.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.DisableResizing;
			dataGridViewCellStyle2.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.dgvProduct.RowsDefaultCellStyle = dataGridViewCellStyle2;
			this.dgvProduct.RowTemplate.DefaultCellStyle.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.dgvProduct.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
			this.dgvProduct.Size = new Size(886, 463);
			this.dgvProduct.TabIndex = 2;
			this.btnSearch.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnSearch.FlatAppearance.BorderColor = Color.FromArgb(255, 128, 255);
			this.btnSearch.FlatStyle = FlatStyle.Flat;
			this.btnSearch.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnSearch.Location = new System.Drawing.Point(9, 565);
			this.btnSearch.Name = "btnSearch";
			this.btnSearch.Size = new Size(99, 26);
			this.btnSearch.TabIndex = 44;
			this.btnSearch.Text = "Xem thẻ kho";
			this.btnSearch.UseVisualStyleBackColor = true;
			this.btnSearch.Click += new EventHandler(this.btnSearch_Click);
			this.btnPrint.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnPrint.Enabled = false;
			this.btnPrint.FlatAppearance.BorderColor = Color.FromArgb(255, 128, 255);
			this.btnPrint.FlatStyle = FlatStyle.Flat;
			this.btnPrint.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnPrint.Location = new System.Drawing.Point(110, 565);
			this.btnPrint.Name = "btnPrint";
			this.btnPrint.Size = new Size(107, 26);
			this.btnPrint.TabIndex = 43;
			this.btnPrint.Text = "Xem và in  [ F7 ]";
			this.btnPrint.UseVisualStyleBackColor = true;
			this.btnPrint.Click += new EventHandler(this.btnPrint_Click);
			this.btnClose.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.btnClose.FlatAppearance.BorderColor = Color.FromArgb(255, 128, 255);
			this.btnClose.FlatStyle = FlatStyle.Flat;
			this.btnClose.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnClose.Location = new System.Drawing.Point(791, 565);
			this.btnClose.Name = "btnClose";
			this.btnClose.Size = new Size(100, 26);
			this.btnClose.TabIndex = 42;
			this.btnClose.Text = "Thoát  [ ESC ]";
			this.btnClose.UseVisualStyleBackColor = true;
			this.btnClose.Click += new EventHandler(this.btnClose_Click);
			this.btnExportToExcel.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnExportToExcel.Enabled = false;
			this.btnExportToExcel.FlatAppearance.BorderColor = Color.FromArgb(255, 128, 255);
			this.btnExportToExcel.FlatStyle = FlatStyle.Flat;
			this.btnExportToExcel.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnExportToExcel.Location = new System.Drawing.Point(219, 565);
			this.btnExportToExcel.Name = "btnExportToExcel";
			this.btnExportToExcel.Size = new Size(114, 26);
			this.btnExportToExcel.TabIndex = 46;
			this.btnExportToExcel.Text = "Xuất File Excel";
			this.btnExportToExcel.UseVisualStyleBackColor = true;
			this.btnExportToExcel.Click += new EventHandler(this.btnExportToExcel_Click);
			this.label8.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
			this.label8.BackColor = Color.White;
			this.label8.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label8.Location = new System.Drawing.Point(7, 563);
			this.label8.Name = "label8";
			this.label8.Size = new Size(886, 31);
			this.label8.TabIndex = 95;
			this.label8.TextAlign = ContentAlignment.MiddleRight;
			this.dataGridViewTextBoxColumn1.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.dataGridViewTextBoxColumn1.DataPropertyName = "CreateDate";
			dataGridViewCellStyle3.Format = "D";
			dataGridViewCellStyle3.NullValue = null;
			this.dataGridViewTextBoxColumn1.DefaultCellStyle = dataGridViewCellStyle3;
			this.dataGridViewTextBoxColumn1.HeaderText = "Ngày hoá đơn";
			this.dataGridViewTextBoxColumn1.MinimumWidth = 110;
			this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
			this.dataGridViewTextBoxColumn1.Width = 110;
			this.dataGridViewTextBoxColumn2.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.dataGridViewTextBoxColumn2.DataPropertyName = "BillID";
			this.dataGridViewTextBoxColumn2.HeaderText = "Hoá đơn";
			this.dataGridViewTextBoxColumn2.MinimumWidth = 120;
			this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
			this.dataGridViewTextBoxColumn2.Width = 120;
			this.dataGridViewTextBoxColumn3.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.dataGridViewTextBoxColumn3.DataPropertyName = "Packet";
			this.dataGridViewTextBoxColumn3.HeaderText = "Số lô";
			this.dataGridViewTextBoxColumn3.MinimumWidth = 100;
			this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
			this.dataGridViewTextBoxColumn4.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.dataGridViewTextBoxColumn4.DataPropertyName = "productPrice";
			dataGridViewCellStyle4.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle4.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.dataGridViewTextBoxColumn4.DefaultCellStyle = dataGridViewCellStyle4;
			this.dataGridViewTextBoxColumn4.HeaderText = "Đơn giá";
			this.dataGridViewTextBoxColumn4.MinimumWidth = 100;
			this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
			this.dataGridViewTextBoxColumn5.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
			this.dataGridViewTextBoxColumn5.DataPropertyName = "Note";
			this.dataGridViewTextBoxColumn5.HeaderText = "Ghi chú";
			this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
			this.dataGridViewTextBoxColumn6.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.dataGridViewTextBoxColumn6.DataPropertyName = "productNumber";
			dataGridViewCellStyle5.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle5.Format = "N0";
			dataGridViewCellStyle5.NullValue = null;
			this.dataGridViewTextBoxColumn6.DefaultCellStyle = dataGridViewCellStyle5;
			this.dataGridViewTextBoxColumn6.HeaderText = "Số lượng nhập";
			this.dataGridViewTextBoxColumn6.MinimumWidth = 120;
			this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6";
			this.dataGridViewTextBoxColumn6.Width = 120;
			this.dataGridViewTextBoxColumn7.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.dataGridViewTextBoxColumn7.DataPropertyName = "ProductNumberOut";
			dataGridViewCellStyle6.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle6.Format = "N0";
			dataGridViewCellStyle6.NullValue = null;
			this.dataGridViewTextBoxColumn7.DefaultCellStyle = dataGridViewCellStyle6;
			this.dataGridViewTextBoxColumn7.HeaderText = "Số lượng xuất";
			this.dataGridViewTextBoxColumn7.MinimumWidth = 120;
			this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7";
			this.dataGridViewTextBoxColumn7.Width = 120;
			this.dataGridViewTextBoxColumn8.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.dataGridViewTextBoxColumn8.DataPropertyName = "ProductNumberBalancer";
			dataGridViewCellStyle7.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle7.Format = "N0";
			dataGridViewCellStyle7.NullValue = null;
			this.dataGridViewTextBoxColumn8.DefaultCellStyle = dataGridViewCellStyle7;
			this.dataGridViewTextBoxColumn8.HeaderText = "Số lượng tồn";
			this.dataGridViewTextBoxColumn8.MinimumWidth = 120;
			this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8";
			this.dataGridViewTextBoxColumn8.Width = 120;
			this.dataGridViewTextBoxColumn9.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.dataGridViewTextBoxColumn9.DataPropertyName = "productUnit";
			this.dataGridViewTextBoxColumn9.HeaderText = "Đơn vị tính";
			this.dataGridViewTextBoxColumn9.MinimumWidth = 110;
			this.dataGridViewTextBoxColumn9.Name = "dataGridViewTextBoxColumn9";
			this.dataGridViewTextBoxColumn9.Width = 110;
			this.dataGridViewTextBoxColumn10.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.dataGridViewTextBoxColumn10.DataPropertyName = "Pid";
			this.dataGridViewTextBoxColumn10.HeaderText = "Mã sản phẩm";
			this.dataGridViewTextBoxColumn10.Name = "dataGridViewTextBoxColumn10";
			this.dataGridViewTextBoxColumn10.Visible = false;
			this.Column7.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column7.DataPropertyName = "CreateDate";
			dataGridViewCellStyle8.Format = "D";
			dataGridViewCellStyle8.NullValue = null;
			this.Column7.DefaultCellStyle = dataGridViewCellStyle8;
			this.Column7.HeaderText = "Ngày hoá đơn";
			this.Column7.MinimumWidth = 110;
			this.Column7.Name = "Column7";
			this.Column7.ReadOnly = true;
			this.Column7.Width = 110;
			this.Column2.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column2.DataPropertyName = "BillID";
			this.Column2.HeaderText = "Hoá đơn";
			this.Column2.MinimumWidth = 120;
			this.Column2.Name = "Column2";
			this.Column2.ReadOnly = true;
			this.Column2.Width = 120;
			this.Packet.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Packet.DataPropertyName = "Packet";
			this.Packet.HeaderText = "Số lô";
			this.Packet.MinimumWidth = 100;
			this.Packet.Name = "Packet";
			this.Packet.ReadOnly = true;
			this.Column8.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column8.DataPropertyName = "productPrice";
			dataGridViewCellStyle9.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle9.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.Column8.DefaultCellStyle = dataGridViewCellStyle9;
			this.Column8.HeaderText = "Đơn giá";
			this.Column8.MinimumWidth = 100;
			this.Column8.Name = "Column8";
			this.Column8.ReadOnly = true;
			this.Column1.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
			this.Column1.DataPropertyName = "Note";
			this.Column1.HeaderText = "Ghi chú";
			this.Column1.Name = "Column1";
			this.Column1.ReadOnly = true;
			this.Column4.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column4.DataPropertyName = "productNumber";
			dataGridViewCellStyle10.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle10.Format = "N0";
			dataGridViewCellStyle10.NullValue = null;
			this.Column4.DefaultCellStyle = dataGridViewCellStyle10;
			this.Column4.HeaderText = "Số lượng nhập";
			this.Column4.MinimumWidth = 120;
			this.Column4.Name = "Column4";
			this.Column4.ReadOnly = true;
			this.Column4.Width = 120;
			this.Column5.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column5.DataPropertyName = "ProductNumberOut";
			dataGridViewCellStyle11.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle11.Format = "N0";
			dataGridViewCellStyle11.NullValue = null;
			this.Column5.DefaultCellStyle = dataGridViewCellStyle11;
			this.Column5.HeaderText = "Số lượng xuất";
			this.Column5.MinimumWidth = 120;
			this.Column5.Name = "Column5";
			this.Column5.ReadOnly = true;
			this.Column5.Width = 120;
			this.Column6.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column6.DataPropertyName = "ProductNumberBalancer";
			dataGridViewCellStyle12.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle12.Format = "N0";
			dataGridViewCellStyle12.NullValue = null;
			this.Column6.DefaultCellStyle = dataGridViewCellStyle12;
			this.Column6.HeaderText = "Số lượng tồn";
			this.Column6.MinimumWidth = 120;
			this.Column6.Name = "Column6";
			this.Column6.ReadOnly = true;
			this.Column6.Width = 120;
			this.Column3.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column3.DataPropertyName = "productUnit";
			this.Column3.HeaderText = "Đơn vị tính";
			this.Column3.MinimumWidth = 110;
			this.Column3.Name = "Column3";
			this.Column3.ReadOnly = true;
			this.Column3.Width = 110;
			this.Column9.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column9.DataPropertyName = "Pid";
			this.Column9.HeaderText = "Mã sản phẩm";
			this.Column9.Name = "Column9";
			this.Column9.ReadOnly = true;
			this.Column9.Visible = false;
			base.AutoScaleDimensions = new SizeF(7f, 15f);
			//base.AutoScaleMode = AutoScaleMode.Font;
			base.ClientSize = new Size(900, 600);
			base.Controls.Add(this.btnExportToExcel);
			base.Controls.Add(this.btnSearch);
			base.Controls.Add(this.btnPrint);
			base.Controls.Add(this.btnClose);
			base.Controls.Add(this.dgvProduct);
			base.Controls.Add(this.groupBox1);
			base.Controls.Add(this.label8);
			this.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 0);
			//base.Icon = (System.Drawing.Icon)componentResourceManager.GetObject("$this.Icon");
			//base.Icon = (Icon)componentResourceManager.GetObject("$this.Icon");
			base.Name = "frmStorageCard";
			base.StartPosition = FormStartPosition.CenterScreen;
			this.Text = "THẺ KHO";
			base.Load += new EventHandler(this.frmStorageCard_Load);
			this.groupBox1.ResumeLayout(false);
			this.groupBox1.PerformLayout();
			((ISupportInitialize)this.dgvProduct).EndInit();
			base.ResumeLayout(false);
		}
	}
}
